﻿<%@ Page Language="C#" MasterPageFile="~/travel-hotels/Travel_Hotels.master" AutoEventWireup="true"
    CodeFile="details.aspx.cs" Inherits="travel_hotels_details" %>

<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="../includes/ValidationError-NEW.js" type="text/javascript"></script>

    <script src="../includes/ValidationEffect-NEW.js" type="text/javascript"></script>

    <script src="../includes/LoadingProgress.js" type="text/javascript"></script>

    <%--    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCKuLKZvy09z9OUUYzCGGiFFVsPcPYgS9Y&sensor=false"></script>--%>

    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

    <style type="text/css">
        .picpreview
        {
            position: absolute;
            visibility: hidden;
            border: solid 1px #CCC;
            padding: 5px;
            float: left;
            margin-top: 0px;
        }
        .defaultpic
        {
            position: absolute;
            border: solid 1px #CCC;
            padding: 5px;
            float: left;
            margin-top: 0px;
        }
        .ratedetails
        {
            position: absolute;
            visibility: hidden;
            border: solid 1px #CCC;
            padding: 5px;
            float: left;
            margin-top: 0px;
            width: 400px;
            height: 400px;
            background-color: White;
        }
    </style>
    <div class="elements_inner_wrapper m10t">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <%--   <!-- #Include file="../includes/body_loader.inc" -->
--%>

        <script type="text/javascript">
            function initialize() {
                var maplat = document.getElementById('<%=inputLat.ClientID%>').value;
                var maplong = document.getElementById('<%=inputLong.ClientID%>').value;

                //var latlng = new google.maps.LatLng(40.7562008, -73.9903784);
                var latlng = new google.maps.LatLng(maplat, maplong);
                var settings = {
                    zoom: 15,
                    center: latlng,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                };
                var map = new google.maps.Map(document.getElementById('map_overview'), settings);

                var myMarker = new google.maps.Marker({
                    position: latlng,
                    map: map,
                    title: ""
                });

            }

            function initializeLocation() {
                var maplat = document.getElementById('<%=inputLat.ClientID%>').value;
                var maplong = document.getElementById('<%=inputLong.ClientID%>').value;
                
                var latlng2 = new google.maps.LatLng(maplat, maplong);
                var settings2 = {
                    zoom: 15,
                    center: latlng2,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                };
                var map2 = new google.maps.Map(document.getElementById('map_canvas'), settings2);

                var myMarker2 = new google.maps.Marker({
                    position: latlng2,
                    map: map2,
                    title: ""
                });
            }
        </script>

        <div id="divContent" style="display: ">
            <div class="btitle_full a_rad f12" style="height:16px;">
                <div class="left">
                    <asp:LinkButton ID="lnkbtnBack" runat="server" Text="<< Back to Hotel List" OnClick="btnBack_Click"
                        CausesValidation="false"></asp:LinkButton>
                    <asp:Label ID="lblMessage" runat="server"></asp:Label>
                </div>
                <div class="right">
                    <asp:Label ID="lblSearchDetails" runat="server"></asp:Label>
                </div>
            </div>
            
            <div class="hotelwrap">
                <div class="left">
                    <h3>
                        <asp:Label ID="lblHotelName" runat="server"></asp:Label>
                    </h3>
                    <asp:Button ID="btnRatings" runat="server" CssClass="rating-0" Enabled="false" />
                    <br />
                    <asp:Label ID="lblAddress" runat="server" CssClass="f12"></asp:Label>
                </div>
                <div class="right txtright">
                    <asp:Label runat="server" ID="lblratedesc" CssClass="f11" Text="Avg. Nightly Rate from"></asp:Label>
                    <br />
                    <asp:Label runat="server" ID="lblCurrency" Font-Bold="true"></asp:Label>
                    <asp:Label ID="lblPrice" runat="server" ForeColor="Green" Font-Size="X-Large" Font-Bold="true"></asp:Label>

                    <asp:Label runat="server" ID="lblCurrency2" Font-Bold="true"></asp:Label>
                    <asp:Label runat="server" ID="lblPromoPrice" CssClass="price" ForeColor="Red"></asp:Label>
                    <br />
                    <asp:Label runat="server" ID="lblPromoDesc" ForeColor="OrangeRed"></asp:Label>
                    <a href="#" onclick="ToggleMenu(3)">Book Now</a>
                </div>
                <div class="seperator"></div>
                <div class="clear"></div>
                
                <ul class="tabs">
                    <li><a href="#" onclick="ToggleMenu(1)" class="active" id="tabOverview">Overview</a></li>
                    <li><a href="#" onclick="ToggleMenu(2)" id="tabPhotos" runat="server" alt="photo" >Photos</a></li>
                    <li><a href="#" onclick="ToggleMenu(3)" id="tabRoomRates">Rooms & Rates</a></li>
                    <li><a href="#" onclick="ToggleMenu(4)" id="tabLocation">Location</a></li>
                </ul>
                <div class="tab-content">
                    
                    <div id="divPhotos" style="display: none;" class="hotel_content">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td runat="server" id="tdHotelPicPreview" style="width: 400px; height: 270px;" valign="top">
                                    <asp:Image ID="imgHotel" runat="server" CssClass="defaultpic" Width="370px" Height="270px"
                                        BorderWidth="1" />
                                </td>
                                <td runat="server" id="tdHotelPics" valign="middle" style="text-align: center;">
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="i11">
                                    <div class="seperator"></div>
                                    Note: It is the responsibility of the hotel chain and/or the individual property
                                    to ensure the accuracy of the photos displayed. CompareXpress.com is not responsible
                                    for any inaccuracies in the photos.
                                </td>
                            </tr>
                        </table>
                    </div>                

                    <div id="divOverview" class="hotel_content">
                    
                        <div class="w490 left" style="height:300px; position:relative;">
                            <asp:Image ID="imgOverviewImage" CssClass="defaultpic" Width="370px" Height="270px" runat="server" BorderWidth="1" onclick="ToggleMenu(2);" />
                        </div>
                        <div class="w490 right">
                            <div class="mapview">
                                <div id="map_overview" style="width: 478px; height: 300px;">
                                </div>
                            </div>
                        </div>
                        <div class="seperator"></div>
                        <div class="clear"></div>
                        
                        
                        <div class="details_content">
                        <label id="lblPropertyDesc" runat="server"></label>
                        <label id="lblNotification" runat="server"></label>
                        </div>

                        <div class="seperator"></div>


                        <div class="details_content">
                        <h4>Hotel Policy</h4>
                        <div id="divCheckinDates" runat="server">
                            Check-in
                            <asp:Label ID="lblCheckin" runat="server"></asp:Label>
                            | Check-out
                            <asp:Label ID="lblCheckout" runat="server"></asp:Label>
                            <br />
                        </div>
                        Number of Rooms:
                        <asp:Label ID="lblNoOfRooms" runat="server"></asp:Label>
                        <br />
                        Number of Floors:
                        <asp:Label ID="lblNoOfFloors" runat="server"></asp:Label>
                        <br />
                        <label id="lblPolicy" runat="server"></label>
                        <br />
                        <label id="lblAmenities" runat="server"></label>
                        <div class="seperator"></div>
                        <div class="clear"></div>
                        </div>
                    </div>

                    <div id="divRoomRate" style="display: none;">
                        <h3>Rooms & Rates</h3>
                        <asp:Image ID="imgWorldspan" runat="server" ImageUrl="http://developer.ean.com/files/4.bmp"
                            Visible="false" />
                            
                        <div class="seperator"></div>
                        <span class="i11"><asp:Label ID="lblAgencyDisclaimer" runat="server"></asp:Label></span>
                        
                        <asp:GridView ID="gvRooms" runat="server" CellPadding="4" CellSpacing="4" OnRowDataBound="gvRooms_RowDatabound"
                            AutoGenerateColumns="false" Width="100%" CssClass="result-wrapper clearFix res_grid">
                            <Columns>
                                <asp:TemplateField HeaderText="Room Types">
                                    <ItemTemplate>
                                    
                                        <div style="padding:15px; width:87%; text-align:justify; list-style-type:disc;">
                                        
                                        <asp:Label ID="lblRoomType" runat="server" Font-Bold="true"></asp:Label><br />
                                        <asp:Label ID="lblValueAdded" runat="server"></asp:Label><br />
                                        <asp:Label ID="lblPromoDesc" runat="server" ForeColor="OrangeRed" Font-Size="X-Small"></asp:Label>
                                        
                                        <div style="color:#919191"><asp:Label ID="lblDescription" runat="server"></asp:Label></div>
                                        <asp:HyperLink ID="lnkRateDetails" runat="server" Text="*check rate details for more information"
                                            Visible="false"></asp:HyperLink><br />
                                        <div id="divRateDetails" runat="server" class="ratedetails" >
                                            <p style="text-align:center"><b>Rate Details </b></p><br />
                                            <asp:Label ID="lblAgencyHotelName" runat="server" Font-Size="Medium" Font-Bold="true"></asp:Label><br />
                                            Check-in: <asp:Label ID="lblAgencyCheckin" runat="server"></asp:Label><br />
                                            Check-out: <asp:Label ID="lblAgencyCheckout" runat="server"></asp:Label><br /><br />
                                            Important rate information<br />
                                            * Room rate disclaimer: <asp:Label ID="lblAgencyRoom" runat="server"></asp:Label><br />
                                            * The hotel requires a credit card guarantee for this room.<br />
                                            * The hotel can only guarantee this rate for 2 or less guests in this room. If there are more guests,
                                            additional charges may incur, or the property may advise an additional room. 
                                            <br /><br />
                                            Information provided from the property <br />
                                            Room nightly rate info: <asp:Label ID="lblAgencyNightlyRate" runat="server"></asp:Label> <br />
                                            Total room rate: <asp:Label ID="lblAgencyTotalRate" runat="server"></asp:Label><br />
                                            Room Type: <asp:Label ID="lblAgencyRoomType" runat="server"></asp:Label><br />
                                            Charge currency and rules: <asp:Label ID="lblAgencyCurrency" runat="server"></asp:Label><br />
                                            Room description and amenities: <asp:Label id="lblAgencyRoomDesc" runat="server"></asp:Label><br />
                                        </div>
                                        

                                        <asp:HyperLink ID="lnkMoredetails" runat="server" Text="more details.." ImageUrl="/images/hotel/more-details.png"></asp:HyperLink>
                                        <div id="divmoredetails" style="display: none;" runat="server">
                                            <asp:Label ID="lblNightlyRate" runat="server" Font-Size="Small"></asp:Label><br />
                                            <asp:Label ID="lblRoomAmenities" runat="server" Font-Size="Small"></asp:Label><br />
                                            <br />
                                            <small>
                                                <asp:Label ID="Label1" runat="server" Font-Size="X-Small" Text="cancellation policy"
                                                    Font-Bold="true"></asp:Label></small><br />
                                            <asp:Label ID="lblCancellation" runat="server" Font-Size="X-Small"></asp:Label>
                                        </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Avg. Nightly Rate" HeaderStyle-Width="190px" HeaderStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <div style="width:100%; text-align:center; font-size:17px; color:#ca0000;">
                                        <asp:Label ID="lblCurrency" runat="server" Font-Bold="true"></asp:Label>
                                        <asp:Label ID="lblAveRate" runat="server" Font-Bold="true"></asp:Label>
                                        <asp:Label ID="lblCurrency2" runat="server" Font-Bold="true"></asp:Label>
                                        <asp:Label ID="lblPromoPrice" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField >
                                    <ItemStyle Width="80px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <%--<asp:Button ID="btnBookNow" runat="server" Text="Book Now!" />--%>
                                        <div style="padding:10px;"><asp:HyperLink runat="server" ID="hlnkBook" Text="Book Now" ImageUrl="/images/hotel/booknow.png"></asp:HyperLink></div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle CssClass="res_grid_h" />
                            <AlternatingRowStyle />
                            <RowStyle CssClass="borderbg" />
                        </asp:GridView>
                        
                        <div class="seperator"></div>
                        <span class="i11">* Prices are per room/unit and do not include taxes and service fees or any extra
                            guest charges. </span>
                        
                        <asp:Label ID="lblDisclaimerRates" runat="server" class="i11"></asp:Label>
                        <div class="seperator"></div>
                        <div class="clear"></div>
                    </div>

                    <div id="divLocation" style="display: none;">
                        <div class="w490 left" >
                            <label id="lblLocationDescription" runat="server"></label>
                        </div>
                        <div class="w490 right">
                            <div class="mapview">                                
                                <div id="map_canvas" style="width: 478px; height: 300px;"></div>
                            </div>                           
                        </div>
                        
                        <div class="seperator"></div>
                        <div class="clear"></div>
                         <input type="hidden" id="inputLat" runat="server" /><input type="hidden" id="inputLong" runat="server" />
                    </div>  

                </div>
                
            </div>
        </div>
        <div class="seperator"></div>
        <div class="clear"></div>
        
        <input id="inputselecteddiv" type="hidden" />
        <asp:Button runat="server" ID="btnBack" Visible="true" onmousedown="this.className = 'button_back_mousedown';"
            onmouseout="this.className = 'button_back';" onmouseup="this.className = 'button_back';"
            CssClass="button_back" CausesValidation="false" OnClientClick="if (Page_ClientValidate('none')){this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_processing';} return true;"
            OnClick="btnBack_Click" />
    </div>

    <script type="text/javascript">
        window.onload = initialize();

        function ShowPicture(id, Source) {
            if (Source == "1") {
                if (document.layers) document.layers['' + id + ''].visibility = "show"
                else if (document.all) document.all['' + id + ''].style.visibility = "visible"
                else if (document.getElementById) document.getElementById('' + id + '').style.visibility = "visible"
            }
            else
                if (Source == "0") {
                if (document.layers) document.layers['' + id + ''].visibility = "hide"
                else if (document.all) document.all['' + id + ''].style.visibility = "hidden"
                else if (document.getElementById) document.getElementById('' + id + '').style.visibility = "hidden"
            }
        }

        function ShowHideDiv(divName, varOnOff) {
            if (varOnOff) {
                document.getElementById(divName).style.display = "";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }
        }

        function showrates(id) {
            
            document.getElementById('inputselecteddiv').value = '';

                if (document.getElementById) {

                    if (document.getElementById(id).style.visibility == "visible") {
                        document.getElementById(id).style.visibility = "hidden";
                    }
                    else {
                        document.getElementById(id).style.visibility = "visible";
                    }

                }
           
            document.getElementById('inputselecteddiv').value = id;
        }


//        document.onmousedown = function() {
//            var selecteddiv = document.getElementById('inputselecteddiv').value;
//            if (selecteddiv != "") {
//                if (document.getElementById(selecteddiv).style.visibility == "visible") {
//                    document.getElementById(selecteddiv).style.visibility = "hidden";
//                }
//            }
//        }

        function showmoredetails(controlname) {
            if (document.getElementById(controlname).style.display == "") {
                document.getElementById(controlname).style.display = "none";
            }
            else {
                document.getElementById(controlname).style.display = "";
            }
        }

        function ToggleMenu(showtab) {

            if (showtab == '1') {            
                ShowHideDiv('divOverview', true);
                ShowHideDiv('divPhotos', false);
                ShowHideDiv('divRoomRate', false);
                ShowHideDiv('divLocation', false);

                document.getElementById('tabOverview').setAttribute("class", "active");                
                document.getElementById('tabRoomRates').setAttribute("class", "");
                document.getElementById('tabLocation').setAttribute("class", "");

                if (document.getElementById('<%=tabPhotos.ClientID%>') != null) {
                    document.getElementById('<%=tabPhotos.ClientID%>').setAttribute("class", "");
                }
            }

            if (showtab == '2') {
                ShowHideDiv('divOverview', false);
                ShowHideDiv('divPhotos', true);
                ShowHideDiv('divRoomRate', false);
                ShowHideDiv('divLocation', false);

                document.getElementById('tabOverview').setAttribute("class", "");                
                document.getElementById('tabRoomRates').setAttribute("class", "");
                document.getElementById('tabLocation').setAttribute("class", "");

                if (document.getElementById('<%=tabPhotos.ClientID%>') != null) {
                    document.getElementById('<%=tabPhotos.ClientID%>').setAttribute("class", "active");
                }
            }

            if (showtab == '3') {
                ShowHideDiv('divOverview', false);
                ShowHideDiv('divPhotos', false);
                ShowHideDiv('divRoomRate', true);
                ShowHideDiv('divLocation', false);

                document.getElementById('tabOverview').setAttribute("class", "");                
                document.getElementById('tabRoomRates').setAttribute("class", "active");
                document.getElementById('tabLocation').setAttribute("class", "");

                if (document.getElementById('<%=tabPhotos.ClientID%>') != null) {
                    document.getElementById('<%=tabPhotos.ClientID%>').setAttribute("class", "");
                }
            }

            if (showtab == '4') {
                ShowHideDiv('divOverview', false);
                ShowHideDiv('divPhotos', false);
                ShowHideDiv('divRoomRate', false);
                ShowHideDiv('divLocation', true);

                document.getElementById('tabOverview').setAttribute("class", "");                
                document.getElementById('tabRoomRates').setAttribute("class", "");
                document.getElementById('tabLocation').setAttribute("class", "active");

                if (document.getElementById('<%=tabPhotos.ClientID%>') != null) {
                    document.getElementById('<%=tabPhotos.ClientID%>').setAttribute("class", "");
                }

                initializeLocation();
            }
        }

        //        IncreaseProgress(100);

        //        HideLoading();

    </script>

</asp:Content>
